package com.lam;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Stream;

public class Sort {

    public void sortString(){
        Arrays.stream(new int[] {1,2,3})
                .map(n -> 2*n+1)
                .average()
                .ifPresent(System.out::println);
        Stream.of("a1","a2","a3")
                .map(s ->s.substring(1))
                .mapToInt(Integer::parseInt)
                .max()
                .ifPresent(System.out::println);
    }

    public static void main(String [] args){
        Sort sotr = new Sort();
        sotr.sortString();
    }
}